<#assign slug_or_id=ctx.pathMap("/article/{akey}").akey/>
<#assign is_category=false>
<!--全局共享变量article-->
<#if XUtil.isNumber(slug_or_id) >
<#assign am=db.table("article")
.where('id=?',slug_or_id?number)
.select("*")
.caching(cache).cacheTag("article_"+slug_or_id)
.getMap() />
<#else>
<#assign am=db.table("article")
.where('slug=?', slug_or_id)
.select("*")
.caching(cache).cacheTag("article_"+slug_or_id)
.getMap() />
</#if>

<#if (am?size > 0) >
<#assign loged=db.table("article")
.set('view_count',"$view_count+1")
.where('id=?', am.id).update() />
</#if>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Solon，轻量级应用开发框架</title>
    <meta http-equiv="cleartype" content="on" />
    <meta name="MobileOptimized" content="320" />
    <meta name="HandheldFriendly" content="True" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8 " />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes" />

    <script src="//cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>

    <!-- highlight lib -->
    <script src="${XUtil.cfgGet('ext_file_md_cdn_highlight_js')}"></script>
    <link href="${XUtil.cfgGet('ext_file_md_cdn_highlight_css')}" rel="stylesheet" type="text/css" />
    <link href="/img/ext_file_md/markdown_github.css" rel="stylesheet" type="text/css" />

    <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/languages/bash.min.js"></script>

    <style>
        *,*::before, *::after { box-sizing: border-box; }
        html,body,main,left,right,middle,tree,menu,header,footer,block,blockquote,flex,li,ul,ol,p,hr,cell,switcher,selector,file,checkbox,radio,boxlist,detail,label,h1,h2,h3,h4,h5,h6,pre{ margin: 0px; padding: 0px; }

        left{text-algin:left; display:inline-block;}
        right{text-algin:right; float:right; display:inline-block;}

        body{margin: 10px auto; color:#333;}
        main{width: 999px; margin: 40px auto;}

        a{color:#000; cursor: default;}
        a:hover{color:#333;}

        topbar{display: block; width: 999px; margin: auto; border: 1px solid #888; line-height: 26px;}
        topbar section{width: 999px; margin: auto;}
        topbar h2{padding: 10px;}
        topbar ul{display:inline-block;}
        topbar li{display: inline-block; margin-left:10px; padding: 10px;}

        .btn-group{position: relative; display:inline-block;}
        .btn-group .btn-dropdown{display: none;  box-shadow: 0 3px 5px rgba(0, 0, 0, .125);}
        .btn-group .btn-dropdown .btn-link{display:block;cursor: default; line-height:1.5em;}
        .btn-group:hover .btn-dropdown{display: inline-block; position:absolute; z-index:99; right:0px; top:40px; }

        .btn-dropdown {padding-top:10px;}
        .btn-dropdown .btn-link{background:#fff; padding: 5px; width:150px; border-style: solid; border-color: #888; border-width: 1px 1px 0 1px}
        .btn-dropdown .btn-link:last-child{border-width: 1px;}

        .center{text-align: center;}

        .tab{display:inline-block; padding:10px; background: #f6f8fa}



        .slogan{margin-bottom: 30px;}
        .slogan h1{text-algin:center; display:inline-block;}

        .features{display: inline-block; margin-top:20px;}
        .features li{display: inline-block; width: 100px; height: 90px; line-height:90px; margin: 10px; border: 1px solid #888; text-algin:center;}

        .projects main{display: flex;}
        .projects aside{width: 20%;}
        .projects aside ul{border-right: 1px solid #666;}
        .projects aside li{display: block; margin:5px;}
        .projects aside li a{display: block; padding:5px;}
        .projects aside li a:hover{background:#f6f8fa}
        .projects aside li.sel > a{background:#333; color:#fff; border-radius: 4px;}
        .projects aside ol li{font-size:0.5rem;}
        .projects article{width: 80%; padding-left: 30px;}
        .projects article > header{margin-bottom: 30px;}
    </style>


</head>
<body class="projects">

<topbar>
    <section>
        <left>
            <h2>Solon</h2>
        </left>
        <right>
            <ul class="nav">
                <li class="btn-group">
                    <a>关于</a>
                    <div class="btn-dropdown">
                        <a class="btn-link">概述</a>
                        <a class="btn-link">更小、更快</a>
                        <a class="btn-link">更自由</a>
                        <a class="btn-link">三元合一</a>
                    </div>
                </li>
                <li class="btn-group">
                    <a>学习</a>
                    <div class="btn-dropdown">
                        <a class="btn-link">概述</a>
                        <a class="btn-link">快速开始</a>
                        <a class="btn-link">向导</a>
                        <a class="btn-link">QA</a>
                    </div>
                </li>
                <li  class="btn-group">
                    <a>项目</a>
                    <div class="btn-dropdown">
                        <a class="btn-link">Overview</a>
                        <a class="btn-link" href="/projects/solon">Solon</a>
                        <a class="btn-link">Solon Web</a>
                        <a class="btn-link">Solon Batch</a>
                        <a class="btn-link">Solon Remoting</a>
                        <a class="btn-link">Solon Cloud</a>
                    </div>
                </li>
                <li  class="btn-group">
                    <a>社区</a>
                    <div class="btn-dropdown">
                        <a class="btn-link" href="https://github.com/noear/solon">GitHub</a>
                        <a class="btn-link" href="https://gitee.com/noear/solon">Gitee</a>
                    </div>
                </li>
            </ul>
        </right>
    </section>
</topbar>

<main>
    <aside>
        <ul>
            <li><a>Solon</a></li>
            <li><a>Solon Boot</a></li>
            <li><a>Solon Serialization</a></li>
            <li><a>Solon View</a></li>
            <li ><a>Solon Data</a>
                <ol>
                    <li class="sel"><a>weed3-solon-plugin</a></li>
                    <li><a>beetlsql-solon-plugin</a></li>
                    <li><a>activerecord-solon-plugin</a></li>
                    <li><a>mybatis-solon-plugin</a></li>
                    <li><a>mybatisplus-solon-plugin</a></li>
                </ol>
            </li>
            <li><a>Solon Logging</a></li>
            <li><a>Solon Auth</a></li>
            <li><a>Solon I18n</a></li>
            <li><a>Solon Web</a></li>
            <li><a>Solon Batch</a></li>
            <li><a>Solon Remoting</a></li>
            <li><a>Solon Cloud</a></li>
        </ul>
    </aside>
    <article>
        <header>
            <h1>${am.title!}</h1>
        </header>
        <section class="markdown-body">
            <#if am.edit_mode ='markdown'>
            ${eMark.mdToHtml(am.content!)}
            <#else>
            ${am.content!}
        </#if>
        </section>
    </article>
</main>
<script>
    $('pre code').each(function(i, block) {
        hljs.highlightBlock(block);
    });
</script>
</body>
</html>

